<?php   
	oh_module_header();
	
	// Interface function   
	function oh_module_editarea($tokens) {
		return oh_this();        
	} 
	class oh_class_editarea { 
		function oh_class_aditarea() {
		}
		function draw($file) {
			$fileinfo = pathinfo($file);
			#oh_dump($fileinfo);
			?>
			<script language="javascript" type="text/javascript" src="<?php echo oh('url.framework.modules.editarea');?>/editarea_0_8_2/edit_area/edit_area_loader.js"></script>
			<script language="javascript" type="text/javascript">
			editAreaLoader.init({
				id: 				"textarea_1",
				syntax: 			"<?php echo $fileinfo['extension']; ?>",
				start_highlight: 	true,
				toolbar:			"search",
				fullscreen:			true
			});
			</script>
			</head>
			<body>
			<form method="post">
			<textarea id="textarea_1" name="content" cols="80" rows="15"><?php echo file_get_contents($file);?></textarea>
			</form>
			<?php
		}
	}
	global $oh_object_editarea;
	$oh_object_editarea = new oh_class_editarea();
?>
